package com.example.zhish.gobang;

import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;

import com.example.zhish.gobang.view.GobangPanel;


//implements PopupMenu.OnMenuItemClickListener
public class MainActivity extends AppCompatActivity  {

    private GobangPanel gobangPanel;

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.gobang);
        gobangPanel = (GobangPanel)findViewById(R.id.gobangpanel111);
    }


   /*PopupMenu popupMenu;
    Menu menu;
    private GobangPanel gobangPanel;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        gobangPanel = (GobangPanel) findViewById(R.id.gobang);

        popupMenu = new PopupMenu(this, findViewById(R.id.title_menu));
        menu = popupMenu.getMenu();

        menu.add(0, 0, 0, "再来一盘");

        popupMenu.setOnMenuItemClickListener(this);


    }


    @Override
    public boolean onMenuItemClick(MenuItem item) {

        if (item.getItemId() == 0) {
            gobangPanel.start();
        }
        return false;
    }

    public void popmenushow(View view) {
        popupMenu.show();
    }

    public void StartPeoplePK(View view) {

        Intent intent = new Intent();
        intent.setAction("gobangactivity");
        startActivity(intent);
    }*/
}
